package com.xl.utils.rabbitmq.service.serviceimpl;

import com.xl.utils.rabbitmq.service.IAmqpService;
import com.xl.utils.util.QueueConstant;
import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author xionglin
 * @Classname AmqpServiceImpl
 * @Description TODO
 * @Date 2019/6/21 15:11
 */
@Service
public class AmqpServiceImpl implements IAmqpService {

    private @Autowired
    AmqpTemplate amqpTemplate;

    @Override
    public void convertAndSend(String message) {
        amqpTemplate.convertAndSend(QueueConstant.QUEUE_NOTIFY_HELLO, message);
    }

}
